Skip to main content

Configuration

The configuration endpoints let you set global scraping behavior for your account and inspect the currently active settings. You must configure at least a results_endpoint before creating jobs.


POST /ereceipts/config

Sets or updates your account configuration. All fields except results_endpoint are optional.

Method: POST Path: /ereceipts/config Content-Type: application/json

Request Headers

HeaderTypeRequiredDescription
api-keystringYesYour BlinkReceipt API key

Request Body

FieldTypeRequiredDefaultDescription
results_endpointstringYesWebhook URL where parsed results are POSTed
day_cutoffintegerNo*How many days back to search for emails. Mutually exclusive with date_cutoff
date_cutoffintegerNo*UNIX timestamp representing the earliest email date to process. Mutually exclusive with day_cutoff
use_aggregationbooleanNofalseWhen true, combines multi-email order flows into a single receipt object
return_emlbooleanNofalseWhen true, includes the raw EML content in the ereceiptRawEML field of each result
retailersarrayNoArray of retailer objects with per-retailer cutoff configuration

You must specify either day_cutoff or date_cutoff at the global level — not both, and not neither. The same rule applies per retailer in the retailers array.

Retailer Object

Each object in the retailers array describes a specific sender address and its cutoff settings.

FieldTypeRequiredDescription
emailstringYesSender email address (e.g., auto-confirm@amazon.com)
day_cutoffintegerNo*Days back to search for this retailer
date_cutoffintegerNo*UNIX timestamp cutoff for this retailer

Example Request

{
"results_endpoint": "https://your-server.com/webhooks/ereceipts",
"day_cutoff": 14,
"use_aggregation": true,
"return_eml": false,
"retailers": [
{
"email": "auto-confirm@amazon.com",
"day_cutoff": 7
},
{
"email": "noreply@ebay.com",
"day_cutoff": 30
}
]
}

Response

{
"success": true
}

On failure, the response includes an error object with a code and message. See error-handling.md for the full list of configuration-related error codes (100–114).


GET /ereceipts/config

Returns the currently active configuration for your account.

Method: GET Path: /ereceipts/config

Request Headers

HeaderTypeRequiredDescription
api-keystringYesYour BlinkReceipt API key

Response

FieldTypeDescription
results_endpointstringConfigured webhook URL
day_cutoffintegerGlobal day cutoff setting
date_cutoffintegerGlobal date cutoff as UNIX timestamp
use_aggregationbooleanWhether aggregation is enabled
return_emlbooleanWhether raw EML is returned in results
retailersarrayArray of configured retailer objects

Example Response

{
"success": true,
"results_endpoint": "https://your-server.com/webhooks/ereceipts",
"day_cutoff": 14,
"use_aggregation": true,
"return_eml": false,
"retailers": [
{
"email": "auto-confirm@amazon.com",
"day_cutoff": 7
},
{
"email": "noreply@ebay.com",
"day_cutoff": 30
}
]
}

Notes

  • Calling POST /ereceipts/config overwrites the previous configuration entirely. To add or update retailers without removing existing ones, first GET the current config and merge your changes before re-POSTing.
  • The results_endpoint must be a valid, publicly reachable HTTPS URL. An invalid URL returns error code 102.
  • For per-retailer configuration management (listing or deleting individual retailers), use the /ereceipts/retailers endpoints described in endpoints.md.